﻿using Cinemachine;
using UnityEngine;

namespace CinemachineExtend
{
    //此脚本添加在VirtualCamera上
    public class CinemathineCore : MonoBehaviour
    {
        public bool b_2d;

        public CinemachineVirtualCamera VirtualCamera { get; private set; }
        public CinemachineCameraOffset CameraOffset { get; private set; }
        public CinemachineImpulseSource ImpulseSource { get; private set; }
        public CameraOffsetController CameraOffsetController { get; private set; }
        public CameraConfinerController CameraConfinerController { get; private set; }

        private void Awake()
        {
            VirtualCamera = GetComponentInChildren<CinemachineVirtualCamera>();
            CameraOffset = GetComponentInChildren<CinemachineCameraOffset>();
            ImpulseSource = GetComponentInChildren<CinemachineImpulseSource>();
            CameraOffsetController = GetComponentInChildren<CameraOffsetController>();
            CameraConfinerController = GetComponentInChildren<CameraConfinerController>();
        }
    }
}
